<?php echo $this->fetch('header.html'); ?>
<script charset="utf-8" type="text/javascript" src="/includes/libraries/javascript/dialog/dialog.js" id="dialog_js"></script>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});

    $('*[ectype="dialog"]').click(function(){
        var id = $(this).attr('dialog_id');
        var title = $(this).attr('dialog_title') ? $(this).attr('dialog_title') : '';
        var url = $(this).attr('uri');
        var width = $(this).attr('dialog_width');
        ajax_form(id, title, url, width);
        return false;
    });
});
</script>
<div id="rightTop">
  <ul class="subnav">
    <?php $_from = $this->_var['_dh_banner']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'subitem');if (count($_from)):
    foreach ($_from AS $this->_var['subitem']):
?>
        <?php if ($this->_var['subitem']['name'] == $this->_var['_curitem']): ?>
            <li><a href="<?php echo $this->_var['subitem']['url']; ?>" class="btn0"><?php echo $this->_var['subitem']['text']; ?></a>
        <?php else: ?>
            <li><a href="<?php echo $this->_var['subitem']['url']; ?>" class="btn1"><?php echo $this->_var['subitem']['text']; ?></a>
        <?php endif; ?>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>  
  </ul>
</div>

<div class="mrightTop">
  <div class="fontl">
    <form method="get">
       <div class="left">
         <input type="hidden" name="app" value="caiwu" />
          <input type="hidden" name="act" value="money_txlog" />
    <select name="type" onchange="location='index.php?app=caiwu&act=money_txlog&type='+this.value+'<?php if ($_GET['add_time_from']): ?>&add_time_from=<?php echo $_GET['add_time_from']; ?><?php endif; ?><?php if ($_GET['add_time_to']): ?>&add_time_to=<?php echo $_GET['add_time_to']; ?><?php endif; ?>';">
      <option value="" <?php if (! $_GET['type']): ?>selected<?php endif; ?>>提现状态</option>
      <option value="1" <?php if ($_GET['type'] == 1): ?>selected<?php endif; ?>>等待审核</option>
      <option value="2" <?php if ($_GET['type'] == 2): ?>selected<?php endif; ?>>等待汇款</option>
      <option value="3" <?php if ($_GET['type'] == 3): ?>selected<?php endif; ?>>已汇款</option>
      <option value="4" <?php if ($_GET['type'] == 4): ?>selected<?php endif; ?>>被驳回</option>
      <option value="5" <?php if ($_GET['type'] == 5): ?>selected<?php endif; ?>>汇款失败</option>
    </select>
      <select name="field_name">
      <option value="order_sn" <?php if ($_GET['field_name'] == 'order_sn'): ?>selected<?php endif; ?>>提现编号</option>
      <option value="pay_order_sn" <?php if ($_GET['field_name'] == 'pay_order_sn'): ?>selected<?php endif; ?>>汇款单号</option>
      <option value="user_name" <?php if ($_GET['field_name'] == 'user_name'): ?>selected<?php endif; ?>>会员名</option>
      <option value="real_name" <?php if ($_GET['field_name'] == 'real_name'): ?>selected<?php endif; ?>>真实姓名</option>
      </select><input type="text" name="field_value" value="<?php echo htmlspecialchars($_GET['field_value']); ?>" />    
    汇款日期：
    <input type="text" name="add_time_from" id="add_time_from" value="<?php echo $_GET['add_time_from']; ?>" style="width:80px;"/> &#8211;
    <input type="text" class="width5" name="add_time_to" id="add_time_to" value="<?php echo $_GET['add_time_to']; ?>" style="width:80px;"/>
   

           <select name="pagenum">
            <option value="20" <?php if ($this->_var['pagenum'] == 20): ?>selected<?php endif; ?>>每页20条</option>
            <option value="50" <?php if ($this->_var['pagenum'] == 50): ?>selected<?php endif; ?>>每页50条</option>
            <option value="100" <?php if ($this->_var['pagenum'] == 100): ?>selected<?php endif; ?>>每页100条</option>
            <option value="150" <?php if ($this->_var['pagenum'] == 150): ?>selected<?php endif; ?>>每页150条</option>
            <option value="200" <?php if ($this->_var['pagenum'] == 200): ?>selected<?php endif; ?>>每页200条</option>
          </select>
          <input type="submit" class="formbtn" value="查询" />
      </div>
      <?php if ($this->_var['filtered']): ?>
      <a class="left formbtn1" href="index.php?app=user">撤销检索</a>
      <?php endif; ?>
    </form>
  </div>
  <div class="fontr"><?php echo $this->fetch('page.top.html'); ?></div>
</div>
<div class="tdare">
         
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dataTable">
  <tr class="tatr1">
    <td>会员</td>
    <td><span class="table-center">提现编号:备注到支付宝 / 汇款单号</span></td>
    <td>汇款/申请时间</td>
    <td class="table-center">金额</td>
    <td class="table-center">真实姓名</td>
    <td class="table-center">银行名称</td>
    <td class="table-center">银行帐号/支付宝帐号</td>
    <td class="table-center">状态</td>
    <td>备注</td>
  </tr>
  <?php $_from = $this->_var['money_txlog']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'mymoney');if (count($_from)):
    foreach ($_from AS $this->_var['mymoney']):
?>
  <tr class="tatr2">
    <td><a href="index.php?app=caiwu&act=money_txlog&field_name=user_name&field_value=<?php echo $this->_var['mymoney']['user_name']; ?>" title="点击查看该用户的所有提现记录"><?php echo $this->_var['mymoney']['user_name']; ?></a>
    <a href="index.php?app=caiwu&user_id=<?php echo $this->_var['mymoney']['user_id']; ?>" target="_blank" style="color:#999">管理</a>
    <a href="index.php?app=caiwu&act=money_list&field_name=user_id&field_value=<?php echo $this->_var['mymoney']['user_id']; ?>" target="_blank" style="color:#999">财务</a>
    <a href="index.php?app=caiwu&amp;act=userinfo&amp;user_id=<?php echo $this->_var['mymoney']['user_id']; ?>" target="_blank" style="color:#999">资料</a></td>
    <td><?php echo $this->_var['mymoney']['order_sn']; ?><br /><font color="#999999"><?php echo $this->_var['mymoney']['pay_order_sn']; ?></font></td>
    <td style="font-size:10px; line-height:10px"><?php echo local_date("Y-m-d H:i:s",$this->_var['mymoney']['admin_time']); ?><br /><font color="#999999"><?php echo local_date("Y-m-d H:i:s",$this->_var['mymoney']['add_time']); ?></font></td>
    <td class="table-center"><strong <?php if ($this->_var['mymoney']['money'] > 0): ?>class=bhong<?php endif; ?>><?php echo ($this->_var['mymoney']['money'] == '') ? '-' : $this->_var['mymoney']['money']; ?></strong></td>
    <td class="table-center"><?php echo $this->_var['mymoney']['real_name']; ?></td>
    <td class="table-center"><?php echo $this->_var['mymoney']['bank_name']; ?></td>
    <td class="table-center"><?php echo $this->_var['mymoney']['bank_account']; ?></td>
    <td class="table-center"><a href="javascript:viod(0)" ectype="dialog" dialog_id="export_ubbcode" dialog_title="" dialog_width="820" uri="<?php echo url('app=caiwu&act=money_tx_view&id=' . $this->_var['mymoney']['id']. ''); ?>"><?php if ($this->_var['mymoney']['leixing'] == 1): ?><font color="#FF0000">等待审核</font>
      <?php elseif ($this->_var['mymoney']['leixing'] == 2): ?>等待汇款
      <?php elseif ($this->_var['mymoney']['leixing'] == 3): ?><font color="#009900">已汇款</font>
      <?php elseif ($this->_var['mymoney']['leixing'] == 4): ?><font color="#FF0000">被驳回</font>
      <?php elseif ($this->_var['mymoney']['leixing'] == 5): ?><font color="#666666">汇款失败</font>
      <?php endif; ?></a></td>
    <td><div style="width:250px;"><?php echo $this->_var['mymoney']['log_text']; ?></div></td>
  </tr>
  <?php endforeach; else: ?>
  <tr class="no_data">
      <td colspan="9"><br />暂无账户收支明细<br /></td>
  </tr>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<div style="margin-top:8px; overflow:hidden; width:100%">
<div class="left">
<?php if ($this->_var['money_total']): ?>金额总计：<strong style="color:#F00"><?php echo $this->_var['money_total']; ?></strong> <?php endif; ?>&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div class="right">
<?php echo $this->fetch('page.bottom.html'); ?>
</div>
</div>
</div>
<iframe id='iframe_post' name="iframe_post" src="about:blank" frameborder="0" width="0" height="0"></iframe>
<?php echo $this->fetch('footer.html'); ?>